package com.csc775.gui;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.*;

import java.net.*;
import java.io.*;

//import com.csc.Activity2;
import com.csc775.networking.*;
import com.csc775.message.*;

import com.example.*;


public class AndroidClient extends Activity {
    
    private EditText text;
    //InetAddress address;
    Socket s;
    OutputStream out=null;
    ObjectOutputStream oos=null;
    String cmd ="";
   //Client c=new Client();;
    
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        
         setContentView(R.layout.login);
         Button signin = (Button) findViewById(R.id.signInButton);
         Button register = (Button) findViewById(R.id.RegisterButton);
         signin.setOnClickListener(new View.OnClickListener() {
             @Override
 			public void onClick(View view) {
                 Intent myIntent = new Intent(view.getContext(), LoginActivity.class);
                 startActivityForResult(myIntent, 0);
                 
             }

         });     
        	  register.setOnClickListener(new View.OnClickListener() {
                  @Override
      			public void onClick(View view) {
                      Intent myIntent = new Intent(view.getContext(), LoginActivity.class);
                      startActivityForResult(myIntent, 0);
                     
                  //  	this.c=new Client("192.168.2.4", 2004);
                  }

              });
        	  
        	  /*try {
      			InetAddress addr = InetAddress.getLocalHost();
          		byte[] ipAddr = addr.getAddress();
          		String hostname = addr.getHostName();
               Socket TCPsocket = new Socket("192.168.2.4", 2004);
               DatagramSocket UDPsocket = new DatagramSocket();
                 } 
                  catch (Exception e) {
                  System.out.println("e"); 
                  }*/
    
       
     }

}